import request from '../../utils/request'

/**
	 * 新增本地费用
	 *
	 * @param localFeeForm
	 * @param bindingResult
	 * @return
	 */
export async function addLocalFee( data ) {
	return request(apiPath.mc + "/api/localFee", {
		method: 'post',
		data
	});
}


	/**
	 * 更新本地费用
	 *
	 * @param localFeeForm
	 * @param bindingResult
	 * @return
	 */
export async function updateLocalFee( data ) {
    return request(apiPath.mc + "/api/localFee", {
        method: 'put',
        data
    });
}

    /**
	 * 根据id删除本地费用
	 *
	 * @param id
	 * @return
	 */
export async function deleteLocalFeeById({ id }){
    return request(apiPath.mc + "/api/localFee/" + id,{
        method: 'delete'
    });
}
   
    /**
	 * 根据id获取本地费用
	 *
	 * @param id
	 * @return
	 */
export async function getLocalFeeById({ id }){
    return request(apiPath.mc +  "/api/localFee/" + id,{
        method: 'get'
    });
}

	/**
	 * 分页查询本地费用
	 * 
	 * @param berthing
	 * @param airline
	 * @param supplier
	 * @param page
	 */
export async function getListForPage({ berthing, airline, supplier, page}){
    return request(apiPath.mc + "/api/localFee",{
        method: 'get',
        data: {  berthing, airline, supplier, page: page.page, size: page.size }
    });
}

	/**
	 * 复制本地费用
	 *
	 * @param localFeeId
	 * @param bindingResult
	 * @return
	 */
	export async function copyLocalFee( {localFeeId} ) {
		return request(apiPath.mc + "/api/copyLocalFee", {
			method: 'post',
			data: {localFeeId}
		});
	}